<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Register</title>
</h:head>
<h:body>
	<h:form id="UserCreateForm">
		<p:panel header="Registration Form">
			<h:panelGrid columns="3" id="regGrid">
				<h:outputLabel for="email">Email:</h:outputLabel>
				<p:inputText id="email" value="#{registration.user.email}" />
				<p:message for="email" />

				<h:outputLabel for="firstName">First name:</h:outputLabel>
				<p:inputText id="firstName" value="#{registration.user.firstName}" />
				<p:message for="firstName" />

				<h:outputLabel for="lastName">Last name:</h:outputLabel>
				<p:inputText id="lastName" value="#{registration.user.lastName}" />
				<p:message for="lastName" />

                                				<h:outputLabel for="gender">Gender:</h:outputLabel>
				<p:inputText id="gender" value="#{registration.user.gender}" />
				<p:message for="gender" />

                                				<h:outputLabel for="address">Address</h:outputLabel>
				<p:inputText id="address" value="#{registration.user.address}" />
				<p:message for="address" />

                                				<h:outputLabel for="country">Country:</h:outputLabel>
				<p:inputText id="country" value="#{registration.user.country}" />
				<p:message for="country" />

				<h:outputLabel for="password">Password:</h:outputLabel>
				<p:password id="password" value="#{registration.user.password}"
					feedback="true" match="pwd2" label="Password"/>
				<p:message for="password" />

				<h:outputLabel for="pwd2">Confirm Password:</h:outputLabel>
				<p:password id="pwd2" label="Confirm Password" value="#{registration.user.password}"/>
			</h:panelGrid>
                    
                                           

                                                                                      
			<p:commandButton type="submit" value="Register" update="regGrid"
				action="#{registration.register}" />

                       <p:commandButton type="reset" value="Cancel"/>

		</p:panel>
	</h:form>
</h:body>
</html>